<?php

require_once "CollectionBase.php";

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Tree
 *
 * @author JeyDotC
 */
class Tree extends CollectionBase{
    
    public function appendInRoute($value, array $route){
        $this->checkType($value);
        
        $currentTree = &$this->collection;
        
        foreach ($route as $node) {
            if(!isset ($currentTree[$node])){
                $currentTree[$node] = array();
            }
            
            $currentTree = &$currentTree[$node];
        }
        
        $currentTree[] = $value;
    }
    
    
    
    public function offsetExists($offset) {
        
    }

    public function offsetGet($offset) {
        
    }

    public function offsetSet($offset, $value) {
        
    }

    public function offsetUnset($offset) {
        
    }

}

?>
